﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Users_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["DeleteUser"] != null && Request.QueryString["DeleteUser"].Length > 0)
        {
            Membership.DeleteUser(Request.QueryString["DeleteUser"], false);
        }
        if (!this.IsPostBack)
        {
            BindDatas();
        }
    }

    private void BindDatas()
    {
        this.GridViewUsers.DataSource = Membership.GetAllUsers();
        this.GridViewUsers.DataBind();
    }
}
